(message "The attempted patch for the HELP file was not unsuccessful, probably an incorrect version. The current HELP file was not changed.\n\nPlease contact your local distributor or GPSoftware for information about obtaining the correct HELP file\n")
(abort "The attempted patch for file \n" OLDFILE "\n was not unsuccessful, probably an incorrect version. Please ensure that you have an original verson of Directory Opus 5 or 5.1 installed")
)
)
)
(delete PATCHFILE (safe))
)
;
; main
;
(welcome "Directory Opus 5.11 Update")
(set HELPFILE 0)
;
; assign the patch to wherever we are disk or ram: etc
;
(makeassign "Dopus511Update" "" (safe))
;
;get our assignments
;
(set DOPdest (getassign "dopus5" "a"))
(set @default-dest DOPdest)
(makeassign "OLDOPUS" DOPdest)
(if (<> (exists "OLDOPUS:DirectoryOpus") 1)
(abort "Directory Opus is not in the Dopus5: directory. You must properly install Directory Opus 5.0 or 5.1 before applying this update patch.")
)
;
;Check versions installed
;
(working "Checking version of current Directory Opus...")
(run "version >env:dopvers5 OLDOPUS:DirectoryOpus full ")
(set DOPVER (substr (getenv "dopvers5") 15 3))
(if (= "5.0" DOPVER)
(set VER 0)
(
(if (= "5.1" DOPVER)
(set VER 1)
(abort "You do not have the correct version "VER" of DirectoryOpus installed on your hard drive. You must have version 5.0 or 5.1 installed to use this patch.")
)
)
)
;
;copy parts required to ram:
;
(makedir "ram:updop")
(makedir "ram:updop/new")
(makeassign "DOPTMP" "ram:updop" (safe))
(makeassign "DOPNEW" "DOPTMP:new" (safe))
(copyfiles
(source "dopus511Update:")
(dest "DOPTMP:")
(pattern "(lhex|spatch)")
(nogauge)
(files)
)
;
; which set of patch files ?
;
(if (= VER 1) (set PCH "pch51.lha")
(set PCH "pch50.lha")
)
(message"\nWe have identified that you have Directory Opus version 5."VER" installed. \n\n"
"\nAbout to update your Directory Opus 5 program and associated files and libraries to version 5.11.\n\n"
"This will take a few minutes.\n"
"Do you wish to continue the update?")
(working "Extracting archives to patch \n Directory Opus version 5."VER"\n\n Please wait...\n")
(run "DOPTMP:lhex >NIL: <NIL: -qfw=DOPTMP: x dopus511Update:dopus_pch.lha " PCH)
(run "DOPTMP:lhex >NIL: <NIL: -qfw=DOPNEW: x " (cat "DOPTMP:" PCH))
(delete (cat "DOPTMP:" PCH))
;
;Thunderbirds are go!
;
(set FILE "DirectoryOpus") (patch)
(set FILE "c/DOpusRT5") (patch)
(set FILE "c/LoadDB") (patch)
(set FILE "libs/dopus5.library") (patch)
(set FILE "modules/about.module") (patch)
(set FILE "modules/configopus.module") (patch)
(set FILE "modules/diskcopy.module") (patch)
(set FILE "modules/diskinfo.module") (patch)
(set FILE "modules/format.module") (patch)
(set FILE "modules/icon.module") (patch)
(set FILE "modules/listerformat.module") (patch)
(set FILE "modules/play.module") (patch)
(set FILE "modules/print.module") (patch)
(set FILE "modules/read.module") (patch)
(set FILE "modules/show.module") (patch)
(if (askbool
(prompt"\nDo you wish to update the Dopus5:Help file?\n"
"\n*** WARNING ***\n\n"
"This updates the ENGLISH HELP file ONLY!\n\n"
"For the GERMAN release, select NO and contact your distributor if you need the new version. (The changes are minor.)")
(help "Contact your local distributor for details of an updated German Help and catalog files\n")
(choices "Yes" "No - Skip this")
)
(
(set HELPFILE 1)
(set FILE "help/dopus5.guide") (patch)
)
)
;
; finally update the REAL Opus directory with the newly patched files
;
(working "Now updating your original Directory Opus Directory with the new files..\n")
(copyfiles
(source "DOPNEW:")
(dest "OLDOPUS:modules")
(pattern "register.module")
(nogauge)
(files)
)
(delete "DOPNEW:register.module")
(copyfiles
(source "DOPNEW:")
(dest "OLDOPUS:")
(optional force)
(all)
)
;
; check if user had Opus as WB replacement
;
(run "version >env:dopldb c:loadwb full")
(set DOPVER1 (substr (getenv "dopldb") 0 6))
(if (= "LoadDB" DOPVER1)
(copyfiles
(source "DOPNEW:c/LoadDB")
(dest "C:")
(newname "LoadWB")
(optional force)
)
)
;
;Install the Readme file
;
(run "DOPTMP:lhex >NIL: <NIL: -qfw=OLDOPUS: x dopus511Update:dopus_pch.lha ReadMe.511")
(if (askbool
(prompt"\nDo you wish to install the extra ARexx scripts which have "
"been contributed by Opus 5 users.\n\n"
"Please see the actual script files for further details of installation and usage.\n")
(help "none")
)
(
(run "DOPTMP:lhex >NIL: <NIL: -qfw=DOPTMP: x dopus511Update:dopus_pch.lha ARexx.lha")
(run "DOPTMP:lhex >NIL: <NIL: -qfw=DOPTMP: x DOPTMP:ARexx.lha")
(copyfiles
(prompt "Please select the files you wish to copy to your Dopus5:Arexx directory\n")
(help @copyfiles-help)
(source "DOPTMP:Arexx")
(dest "OLDOPUS:Arexx")
(confirm)
(all)
)
(run "delete DOPTMP:Arexx all quiet")
)
)
(if (askbool
(prompt"\nDo you wish to Install the ARexx LhADir archive to your Opus 5 Directory?\n\n"
"The LhADir archive was developed by Edmund Vermeulen.\nIt allows you to easily handle LHA and LZH files via Directory Opus 5\n")
(help "none")
)
(
(run "DOPTMP:lhex >NIL: <NIL: -qfw=OLDOPUS: x dopus511Update:LhADirOpus5V10.lha")
(message "\nThe LhADir has been unarchived into your current Dopus5: drawer.\n"
"\nOnce you have finished the Opus 5.11 installation, please "
"open the dopus5:LhADir directory and double click on the "
"'Inslall LhADir' icon to complete the installation of LhADir\n")
(message "\nAll done!\n\nDirectory Opus has now been updated to version 5.11.\nYou should now reboot your Amiga and re-register your Directory Opus to complete the installation.")